package tedu.study.ooday02;

public class Student {
    String name; //成员变量，整个类中有效
    int age = 10;
    String address;

    Student(){
        name="weizhi";
    }

    Student(String name,int age,String address){//局部变量，当前方法中有效
        this.name = name;
        this.age = age;
        this.address = address;
    }

    void study(){
        System.out.println(name+"在学习...");
    }

    void sayHi(){
        System.out.println("大家好，我叫"+name+",今年"+age+"岁了，家住"+address);
    }
}
